<?php
namespace app\cms\admin;
use app\system\admin\Admin;
use app\system\model\SystemConfig as ConfigModel;
use think\Db;
use think\facade\Request;

class Index extends Admin
{
    protected $hisiModel = '';//模型名称[通用添加、修改专用]
    protected $hisiTable = 'cms_banner';//表名称[通用添加、修改专用]
    protected $hisiAddScene = '';//添加数据验证场景名
    protected $hisiEditScene = '';//更新数据验证场景名

    public function index()
    {
        if ($this->request->isAjax()) {
            $where  = $data = [];
            $page   = $this->request->param('page/d', 1);
            $limit  = $this->request->param('limit/d', 15);

            $data['data']   = Db::table("hisi_cms_banner")->select();
            $data['count']  = Db::table("hisi_cms_banner")->where($where)->count('id');
            $data['code']   = 0;
            return json($data);
        }
        return $this->fetch();
    }

}